<?php
$goods_id = isset($_GET['goods_id']) ? intval($_GET['goods_id']) : 0;
if (empty($goods_id)) {
    exit('商品不存在或者已删除');
}
?>

<html>
<head>
    <title>商品详情</title>
</head>
<body>
    这是商品ID为<?php echo $goods_id; ?>详情。

    <a href="/c7/addCart.php?goods_id=<?php echo $goods_id;?>">添加到购物车</a>
</body>
</html>
